package com.first.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.first.common.pojo.EduTeacher;
import com.first.common.pojo.TbMember;
import com.first.order.dao.TbMemberDao;
import com.first.order.service.TbMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

/**
 * @program: SecondProject
 * @description:
 * @author: 李榕轩
 * @create: 2023-05-27 18:41
 **/
@Service
public class TbMemberServiceImpl implements TbMemberService {
    @Autowired
    private TbMemberDao tbMemberDao;
    @Override
    public TbMember queryAllMemberById(String memberId) {
        QueryWrapper<TbMember> wrapper = new QueryWrapper<>();
        if (StringUtils.hasText(memberId)){
            wrapper.eq("id",memberId);
        }

        TbMember tbMember = tbMemberDao.selectOne(wrapper);
        return tbMember;
    }
}
